<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Data/Index Monitor</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style>
        body.IE_M7, body.IE_M8, body.Win6{font-family:"Segoe UI", Tahoma, Verdana, Arial;}
        body.Safari{min-width:987px;}
        body.SF_iPhone{-webkit-text-size-adjust:none;}
        body
        {
            margin:0;font-family:Tahoma, Verdana, Arial;
            background-color:#FEFEFE;
            color:#333;
            font-size:12pt;
            width:100%;
            height:100%;
        }
        form{margin:0px;display: inline}
        #mainframe{position:relative;background-color:#FEFEFE;width:100%;height:100%;}
        #task{position:absolute;background-color:#F4FBFF;display:inline;
            border:1px solid #81BEF7;padding:0px;left:0px;top:0px;width:100%;height:100%;}
        .tasklist{position:relative;padding:0px; background-color:#D0E9F7;height:100%;}
        .tasktitle{position:relative;background-color:#2F5FA1;color:#c0c0c0; height:30px;}
        #taskselect{position:relative;background-color:#D0E9F7;color:#2F5FA1;width:100%;}
        #tasklists .tasklists{position:relative;background-color:#F4FBFF;color:#2F5FA1;}
        .task-title{background-color:#2F5FA1;color:#c0c0c0;height:30px;width:100%;}
        .ultab{list-style:none;padding:0;margin:0;width:100%;}
        .ltabname{cursor:pointer;font-size:12pt;}
        .ltab{background-color:#D0E9F7;cursor: pointer;width:100%;}
        .ltab-selected{background-color:#F4FBFF;cursor: pointer;width:100%;}
        .lfname{cursor: pointer;}
        .ltask{background-color:#F4FBFF;cursor: pointer;}
        .ltask-selected{background-color:#D0E9F7;cursor: pointer;}
        #nodeform{position:absolute;width:700px;background-color:#ffffff;
            border:1px solid #81BEF7;padding:10px;z-index:99;overflow:auto;display:none;}
        #taskform{position:absolute;width:500px;height:50px;background-color:#ffffff;
            border:1px solid #81BEF7;padding-top:10px;padding-left:6px;font-size:12pt;
            color:#2F5FA1;z-index:99;overflow:auto;display:none;}
        .eadd{color:#5FB404;font-size:13pt;font-weight:bolder;cursor:pointer;}
        .eupdate{color:#FF8000;font-size:13pt;font-weight:bolder;cursor:pointer;}
        .edelete{color:#B4045F;font-size:13pt;font-weight:bolder;cursor:pointer;}
        .eview{color:#0000ff;font-size:13pt;font-weight:bolder;cursor:pointer;}
        .closetxt{cursor:pointer;font-size:10pt;color:#cccccc;text-align:right;}
        .ntask{display:inline;color:red;font-size:12pt;}
        </style>
        <script language='javascript'>
            var chradd = '✚', chrfold = '►', chrtree = '▼', chredit='✎', chrdel='✘', chrview = '☜ ';
            var base64EncodeChars = 
            "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
            var base64DecodeChars = new Array(
            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
            -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63,
            52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1,
            -1,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
            15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1,
            -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
            41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);
            function base64encode(str) 
            {
                var out, i, len;
                var c1, c2, c3;

                len = str.length;
                i = 0;
                out = "";
                while(i < len) {
                    c1 = str.charCodeAt(i++) & 0xff;
                    if(i == len)
                    {
                        out += base64EncodeChars.charAt(c1 >> 2);
                        out += base64EncodeChars.charAt((c1 & 0x3) << 4);
                        out += "==";
                        break;
                    }
                    c2 = str.charCodeAt(i++);
                    if(i == len)
                    {
                        out += base64EncodeChars.charAt(c1 >> 2);
                        out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
                        out += base64EncodeChars.charAt((c2 & 0xF) << 2);
                        out += "=";
                        break;
                    }
                    c3 = str.charCodeAt(i++);
                    out += base64EncodeChars.charAt(c1 >> 2);
                    out += base64EncodeChars.charAt(((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4));
                    out += base64EncodeChars.charAt(((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6));
                    out += base64EncodeChars.charAt(c3 & 0x3F);
                }
                return out;
            }
            function base64decode(str)
            {
                var c1, c2, c3, c4;
                var i, len, out;

                len = str.length;
                i = 0;
                out = "";
                while(i < len) {
                    /* c1 */
                    do {
                        c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
                    } while(i < len && c1 == -1);
                    if(c1 == -1)
                    break;

                    /* c2 */
                    do {
                        c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];
                    } while(i < len && c2 == -1);
                    if(c2 == -1)
                    break;

                    out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));

                    /* c3 */
                    do {
                        c3 = str.charCodeAt(i++) & 0xff;
                        if(c3 == 61)
                        return out;
                        c3 = base64DecodeChars[c3];
                    } while(i < len && c3 == -1);
                    if(c3 == -1)
                    break;

                    out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2));

                    /* c4 */
                    do {
                        c4 = str.charCodeAt(i++) & 0xff;
                        if(c4 == 61)
                        return out;
                        c4 = base64DecodeChars[c4];
                    } while(i < len && c4 == -1);
                    if(c4 == -1)
                    break;
                    out += String.fromCharCode(((c3 & 0x03) << 6) | c4);
                }
                return out;
            }
            function utf16to8(str)
            {
                var out, i, len, c;
                out = "";
                len = str.length;
                for(i = 0; i < len; i++) {
                    c = str.charCodeAt(i);
                    if ((c >= 0x0001) && (c <= 0x007F)) {
                        out += str.charAt(i);
                        } else if (c > 0x07FF) {
                        out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F));
                        out += String.fromCharCode(0x80 | ((c >>  6) & 0x3F));
                        out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
                        } else {
                        out += String.fromCharCode(0xC0 | ((c >>  6) & 0x1F));
                        out += String.fromCharCode(0x80 | ((c >>  0) & 0x3F));
                    }
                }
                return out;
            }
            function utf8to16(str)
            {
                var out, i, len, c;
                var char2, char3;
                out = "";
                len = str.length;
                i = 0;
                while(i < len) {
                    c = str.charCodeAt(i++);
                    switch(c >> 4)
                    { 
                        case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
                        // 0xxxxxxx
                        out += str.charAt(i-1);
                        break;
                        case 12: case 13:
                        // 110x xxxx   10xx xxxx
                        char2 = str.charCodeAt(i++);
                        out += String.fromCharCode(((c & 0x1F) << 6) | (char2 & 0x3F));
                        break;
                        case 14:
                        // 1110 xxxx  10xx xxxx  10xx xxxx
                        char2 = str.charCodeAt(i++);
                        char3 = str.charCodeAt(i++);
                        out += String.fromCharCode(((c & 0x0F) << 12) |
                        ((char2 & 0x3F) << 6) |
                        ((char3 & 0x3F) << 0));
                        break;
                    }
                }

                return out;
            }
            function start_wait()
            {
                document.body.style.cursor = 'wait';
            }
            function over_wait()
            {
                document.body.style.cursor = 'auto';
            }
            function base64strdecode(str)
            {
                return utf8to16(base64decode(str));
            }
            function trim(str)
            {
                return str.replace(/(^\s+|\s+$)/, "");
            }
            function removeElement(_element)
            {
                var _parentElement = _element.parentNode;
                if(_parentElement)
                {
                    _parentElement.removeChild(_element);  
                }
                return hideBFrame();
            }
            function onDiv(div, cssName)
            {
                div.className = cssName;
            }
            function outDiv(div, cssName)
            {
                div.className = cssName;
            }
            function CreateXMLHTTP()
            {
                var xmlhttp = null;
                xmlhttpObj = ["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0",
                "MSXML2.XmlHttp.3.0","MSXML2.XmlHttp","Microsoft.XmlHttp"];
                if(window.XMLHttpRequest)
                {
                    xmlhttp = new XMLHttpRequest();
                }
                else if(window.ActiveXObject)
                {
                    for(i=0;i<xmlhttpObj.length;i++)    
                    {
                        try{xmlhttp = new ActiveXObject(xmlhttpObj[i]);break;}
                        catch(e){xmlhttp = null;}
                    }
                }
                else 
                {
                    alert('Can not create XMLHTTP Object');
                }
                return xmlhttp;
            }
            //close form
            function CloseThis(element)
            {
                element.parentNode.parentNode.style.display = "none";
            }
            function HideTaskform()
            {
                var div = document.getElementById('taskform');
                div.style.display = 'none';
                return true;
            }
            //hidden NodeForm
            function HideNodeform()
            {
                var div = document.getElementById('nodeform');
                div.style.display = 'none';
                HideTaskform()
                return true;
            }
            function NodeXAdd(e)
            {
                e = e || window.event;
                var element = e.target || e.srcElement;
                var x = e.clientX + document.body.scrollLeft;
                var y = e.clientY + document.body.scrollTop;
                var Xdiv =  document.getElementById("nodeform");
                Xdiv.style.left = x;
                Xdiv.style.top = y + 10;
                Xdiv.style.display = 'inline';
                //overBFrame(Xdiv);
                var form = document.forms["nodeform"];
                form['op'].value = 1;
                form['limit'].value = 0;
                form['name'].focus();
                form['name'].value = '';
            }
            function TaskXAdd(e, nodeid, nodetype)
            {
                var portlist = ["4832", "4520", "4728"];
                var bkportlist = ["4416", "4104", "4312"];
                e = e || window.event;
                var element = e.target || e.srcElement;
                var Xdiv =  document.getElementById("taskform");
                var x = e.clientX + document.body.scrollLeft;
                var y = e.clientY + document.body.scrollTop;
                Xdiv.style.left = x;
                Xdiv.style.top = y + 10;
                Xdiv.style.display = 'inline';
                var form = document.forms["taskform"];
                form['op'].value = 5;
                form['nodeid'].value = nodeid;
                if(nodetype >= 0)
                    form['port'].value = portlist[nodetype];
                else 
                    form['port'].value = '';
                form['ip'].focus();
                form['ip'].value = '';
            }

            //list nodes 
            function ListNodes(txt)
            {
                var nodelist = document.getElementById('taskselect');
                var nodes = null;
                var res = null;
                var html = "", css = "";
                if(txt && (res = eval(txt)) && nodelist)
                {
                    nodelist.innerHTML = "";
                    if((nodes = res['nodes']) && res['count'] > 0)
                    {
                        var html = "<ul class='ultab'>";
                        for(x in nodes)
                        {
                            var limit = nodes[x]['limit'];
                            var xname = nodes[x]['name'];
                            var total = nodes[x]['total'];
                            html += "<li class='ltab' onmousemove=\"onDiv(this, 'ltab-selected')\"";
                            html += " onmouseout=\"outDiv(this, 'ltab')\" >";
                            html += "<form style='' action='javascript:void(0)' ";
                            html += " onsubmit='return NodeEdit(this);'>"
                            html += "<span class='ltabname' onclick='TaskList("+x+")'";
                            html += " title='点击进入节点任务管理' >"+xname;
                            html += "[<span class='ntask' >"+total+"</span>]</span>"; 
                            html += "&nbsp;&nbsp;&nbsp;&nbsp;限制:";
                            html += "<input type=hidden name='nodeid' value='"+x+"'>";
                            html += "<input type=hidden name='op' value='3'>";
                            html += "<input type=text name='limit' size=12 value='"+limit+"'>";
                            html += "&nbsp;&nbsp;&nbsp;&nbsp;";
                            html += "<span class='edelete' title='Delete' ";
                            html += " onclick=\"NodeDel("+x+")\">"+chrdel+"</span>";
                            html += "</form></li>";
                        }
                        html += "</ul>";
                        nodelist.innerHTML = html;
                    }
                    //alert(txt);
                }
            }
            //list tasks
            function ListTasks(txt)
            {
                var res = null;
                if(txt && (res = eval(txt)))
                {
                    var nodetypelist = ["DocNode", "ParserNode", "IndexNode"];
                    var id = res['id'];
                    var nodename = res['name'];
                    var nodetype = res['type'];
                    var ntasks = res['count'];
                    var total = res['total'];
                    var limit = res['limit'];
                    var host = "";
                    var npackets = 0;
                    var htmlstr =  "<ul class='ultab' >";
                    htmlstr += "<li class='task-title'>";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "点击<span class='eadd' title='Click Add New Task' ";
                    htmlstr += " onclick=\"TaskXAdd(event,'"+id+"','"+nodetype+"')\">"
                            +chradd+"</span>添加任务";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "节点:[<span class='ntask'>"+nodename+"</span>]";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "类型:[<span class='ntask'>"+nodetypelist[nodetype]+"</span>]";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "任务:[<span class='ntask'>"+ntasks+"</span>]";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "索引:[<span class='ntask'>"+total+"</span>]";
                    htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                    htmlstr += "索引限制:[<span class='ntask'>"+limit+"</span>]";
                    htmlstr += "</li>";
                    var tasks = res['tasks'];
                    if(tasks)
                    {
                      for(x in tasks)
                      {
                        host = tasks[x]['host'];
                        npackets = tasks[x]['npackets'];
                        htmlstr += "<li class='ltask' ";
                        htmlstr += " onmousemove=\"onDiv(this, 'ltask-selected')\" ";
                        htmlstr += " onmouseout=\"outDiv(this, 'ltask');\" >";
                        htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                        htmlstr += "<span class='lfname' >"+host;
                        htmlstr += "[<span class='ntask' >"+npackets+"</span>]</span>";
                        htmlstr += "&nbsp;&nbsp;&nbsp;&nbsp;";
                        htmlstr += "<span class='edelete' title='Delete' ";
                        htmlstr += "onclick=\"TaskDel("+x+")\">"+chrdel+"</span>";
                        htmlstr += "</li>";
                      }
                    }
                    htmlstr += "</ul>";
                    var otasklist = document.getElementById('tasklists');
                    otasklist.innerHTML = htmlstr;
                }
            }
            //list 
            function list()
            {
                var xmlHttp = null;
                if((xmlHttp = CreateXMLHTTP()) != null)
                {
                    var argv = "op=4";
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                ListNodes(xmlHttp.responseText);
                            }

                        }
                    }
                    xmlHttp.send(argv);
                }
            }
            //add
            function NodeEdit(form)
            {
                var xmlHttp = null;
                var nodename = "";
                var nodetype = -1;
                var nodeid = -1;
                var limit = -1;
                var argv = "";
                if(form && (op = form['op'].value) > 0)
                {
                    if(op == 1 && (nodetype = form['type'].value) >= 0
                        && (limit = form['limit'].value) >= 0
                        && (nodename = form['name'].value) != "")

                    {
                        argv = "op=1&name="+nodename+"&type="+nodetype+"&limit="+limit;
                    }
                    else if(op == 2 && (nodeid = form['nodeid'].value) >= 0)
                    {
                        argv = "op=2&nodeid="+nodeid;
                    }
                    else if(op == 3 && (nodeid = form['nodeid'].value) >= 0 
                        && (limit = form['limit'].value) >= 0)
                    {
                        argv = "op=3&nodeid="+nodeid+"&limit="+limit;
                    }
                }else alert("请输入正确的数据");
                if(argv && (xmlHttp = CreateXMLHTTP()) != null)
                {
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                HideNodeform();
                                ListNodes(xmlHttp.responseText);
                            }
                        }
                    }
                    xmlHttp.send(argv);
                }
            }
            //del node
            function NodeDel(nodeid)
            {
                
                var argv = "op=2&nodeid="+nodeid;
                if(argv && confirm("确认删除该节点?") && (xmlHttp = CreateXMLHTTP()) != null)
                {
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                HideNodeform();
                                ListNodes(xmlHttp.responseText);
                            }
                        }
                    }
                    xmlHttp.send(argv);
                }
            }
            function TaskList(nodeid)
            {
                var xmlHttp = null;
                if((xmlHttp = CreateXMLHTTP()) != null)
                {
                    var argv = "op=7&nodeid="+nodeid;
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                //alert(xmlHttp.responseText);
                                ListTasks(xmlHttp.responseText);
                            }
                        }
                    }
                    xmlHttp.send(argv);
                }
            }
            function TaskEdit(form)
            {
                var xmlHttp = null;
                var nodeid = -1;
                var ip = "";
                var port = -1
                if((nodeid = form['nodeid'].value) >= 0 && (ip = form['ip'].value) 
                    && (port = form['port'].value) > 0 && (xmlHttp = CreateXMLHTTP()) != null)
                {
                    var argv = "op=5&ip="+ip+"&port="+port+"&nodeid="+nodeid;
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                //alert(xmlHttp.responseText);
                                HideTaskform();
                                ListTasks(xmlHttp.responseText);
                            }
                        }
                    }
                    xmlHttp.send(argv);
                }
                else alert("请输入正确的任务参数!");
            }
            //del node
            function TaskDel(taskid)
            {
                
                var argv = "op=6&taskid="+taskid;
                if(argv && confirm("确认删除该任务?") && (xmlHttp = CreateXMLHTTP()) != null)
                {
                    //alert(argv);
                    xmlHttp.open('POST', '/', true);
                    xmlHttp.setRequestHeader("Content-Length", argv.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                HideTaskform();
                                ListTasks(xmlHttp.responseText);
                            }
                        }
                    }
                    xmlHttp.send(argv);
                }
            }
            //set term status
            function SetTermStatus(form)
            {
                var text = "";
                var status = 0;
                var arr = null;
                var argv = "";
                if(form && (text = form['forbiddenslist'].value)) 
                {
                    status = form['status'].value;
                    if((arr = text.split("\n")) && arr.length > 0)
                    {
                        if(status != 0) argv = "op=15&forbiddens=";
                        else  argv = "op=16&forbiddens=";
                        for(i = 0; i < arr.length; i++)
                        {
                            argv += arr[i]+";"; 
                        }
                        //alert(argv);
                    }
                    if(argv && (xmlHttp = CreateXMLHTTP()) != null)
                    {
                        xmlHttp.open('POST', '/', true);
                        xmlHttp.setRequestHeader("Content-Length", argv.length);
                        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
                        xmlHttp.onreadystatechange=function()
                        {
                            if(xmlHttp.readyState==4)
                            {
                                if(xmlHttp.status == 200)
                                {
                                    alert("操作成功！");
                                    form['forbiddenslist'].value = "";
                                }
                            }
                        }
                        xmlHttp.send(argv);
                    }
                }
            }

            //set item status
            function SetItemStatus(form)
            {
                var idtext = "";
                var status = 0;
                var arr = null;
                var argv = "";
                if(form && (idtext = form['idlist'].value)) 
                {
                    status = form['status'].value;
                    if((arr = idtext.split("\n")) && arr.length > 0)
                    {
                        argv = "op=14&idx_status=";
                        for(i = 0; i < arr.length; i++)
                        {
                            argv += arr[i]+":"+status+";"; 
                        }
                        //alert(argv);
                    }
                    if(argv && (xmlHttp = CreateXMLHTTP()) != null)
                    {
                        xmlHttp.open('POST', '/', true);
                        xmlHttp.setRequestHeader("Content-Length", argv.length);
                        xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
                        xmlHttp.onreadystatechange=function()
                        {
                            if(xmlHttp.readyState==4)
                            {
                                if(xmlHttp.status == 200)
                                {
                                    alert("操作成功！");
                                    form['idlist'].value = "";
                                }
                            }
                        }
                        xmlHttp.send(argv);
                    }
                }
            }
            function resync(obj)
            {
                var xmlhttp = null;
                var uri = "op=0";
                if((xmlHttp = CreateXMLHTTP()) != null)
                {
                    obj.disabled = true;
                    xmlHttp.open('POST', "/", true);
                    xmlHttp.setRequestHeader("Content-Length", uri.length);
                    xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
                    xmlHttp.onreadystatechange=function()
                    {
                        if(xmlHttp.readyState==4)
                        {
                            if(xmlHttp.status == 200)
                            {
                                alert("操作成功!");
                                obj.disabled = false;
                            }
                        }
                    }
                    xmlHttp.send(uri);
                }
                else alert("请求失败!");
            }
            list();
        </script>
    </head>
    <!-- <body onload='javascript:loadInit();'> -->
    <body align=center >
    <div id='mainframe'>
    <div id='task'>
        <div id=task-header >
                            </div>
            <table width=100% height=100% cellspacing=0 border=0 valign=top align=left >
                <tr>
                    <td class='tasklist' valign=top width=500 height=100% >
                        <table cellspacing=0 border=0 valign=top align=left width=100% >
                        <tr>
                                <td valign=top class='tasktitle' width=100% >
                                点击<span class='eadd' title='Add' onclick='NodeXAdd(event)'> ✚ </span>添加索引节点
                            &nbsp;&nbsp;
                            <input type=button name='resync' value='重新同步索引' onclick='resync(this)' >
                            </td>
                        </tr>
                        <tr>
                            <td valign=top width=100% >
                                <div id='taskselect'></div>
                                <br>
                                <br>
                            </td>
                        </tr>
                        <tr>
                            <td valign=top class='tasktitle' width=100% >
                                ItemID管理(每行输入一个ID)
                            </td>
                        </tr>
                        <tr>
                            <form name='idxlist' action='javascript:void(0);' onsubmit='return SetItemStatus(this);'>
                            <td valign=top width=100% >
                            ID列表:<textarea name=idlist rows=4 cols=20></textarea>
                            状态:<select name=status >
                                <option value=0 >生效</option>
                                <option value=-1 selected>失效</option>
                            </select>
                            &nbsp;
                            <input type=submit value='OK'>
                            </td>
                            </form>
                        </tr>

                        <tr>
                            <td valign=top class='tasktitle' width=100% >
                                屏蔽词管理(每行输入一个)
                            </td>
                        </tr>
                        <tr>
                            <form name='forbiddens' action='javascript:void(0);' onsubmit='return SetTermStatus(this);'>
                            <td valign=top width=100% >
                            屏蔽词:<textarea name=forbiddenslist rows=20 cols=20></textarea>
                            状态:<select name=status >
                                <option value=0 >取消</option>
                                <option value=-1 selected>屏蔽</option>
                            </select>
                            &nbsp;
                            <input type=submit value='OK'>
                            </td>
                            </form>
                        </tr>
                                            </table>
                </td>
                <td valign=top align=left class='tasklists' cellspacing=0 border=0 >
                    <div id='tasklists'></div>
                </td>
            </tr>
        </table>
    </div>
    </div>
    <div id='nodeform'>
        <form name='nodeform' action='javascript:void(0);' onsubmit='return NodeEdit(this);'>
            <span class='closetxt' onclick="CloseThis(this)" >关闭</span>
            <input type=hidden name='op' value=1 >
            <input type=hidden name='nodeid' value=-1 >
            <select name='type' >
                <option value='-1' selected>选择类别</option>
                <option value='0' >DocNode</option>
                <option value='1' >ParserNode</option>
                <option value='2' >IndexNode</option>
            </select> 
            &nbsp;&nbsp;
            名称:<input type=text size=32 name='name' >
            &nbsp;&nbsp;
            数据限制:<input type=text size=12 name='limit'>
            &nbsp;&nbsp;
            <input type=submit value='Add'>
    </form>
    </div>
    <div id='taskform'>
        <form name='taskform' action='javascript:void(0);' onsubmit='return TaskEdit(this);'>
            <span class='closetxt' onclick="CloseThis(this)" >关闭</span>
            <input type=hidden name='op' value=5 >
            <input type=hidden name='nodeid' value=-1 >
            <input type=hidden name='type' value=-1 >
            &nbsp;&nbsp;
            IP:<input type=text size=20 name='ip' >:<input type=text size=8 name='port'>
            &nbsp;&nbsp;
            <input type=submit value='Add'>
    </form>
    </div>
</body>
</html>
